/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package FileStructure;

import java.util.ArrayList;

/**
 *
 * @author user
 */
public class ClientRequest {
    //termasuk atribut peer/client (port)
    public String announceURL;
    public long file_length;
    private ArrayList<String> pieceHashVal = new ArrayList<String>();
    public String file_name;
    public long uploaded;
    public long downloaded;
    public long left;
    public String event;
    //constructor

    public ClientRequest(String file_name){
        this.file_name = file_name;
        this.downloaded = 0;
        this.uploaded = 0;
        this.left = 0;
        this.event = null;
    }

    public void addPieceHashVal(String hashval){
        this.pieceHashVal.add(hashval);
    }

    public void removePieceHashVal(String hashval){
        this.pieceHashVal.remove(hashval);
    }

    public ArrayList<String> getPieceHashVal() {
        return pieceHashVal;
    }

    public void setPieceHashVal(ArrayList<String> pieceHashVal) {
        this.pieceHashVal = pieceHashVal;
    }

    

}